]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
lint: Allow multiple spaces before key values
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 28 Jan 2019 00:40:51 +0000 (01:40 +0100)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Fri, 12 Jul 2019 16:01:07 +0000 (16:01 +0000)
This is useful for imitating namespaced flags/enums:

```
const FooFlags = {
    NONE:    0,
    SMEAGLY: 1 << 0,
    SMOGLEY: 1 << 1,
    MUGGLY:  1 << 2
};
```

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/609

lint/eslintrc-shell.json

index 194966b13e25e44d2664d3f0bf7a295fd7df65ff..9c4c96bbac8a70dba704d6b2d311f63c5c8c94f4 100644 (file)
@@ -7,6 +7,14 @@
                 "allow": ["^vfunc_", "^on_"]
             }
         ],
+        "key-spacing": [
+            "error",
+            {
+                "mode": "minimum",
+                "beforeColon": false,
+                "afterColon": true
+            }
+        ],
         "object-curly-spacing": [
             "error",
             "always"